package com.kitty.game.npc.service.appreace;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.activity.service.task.TowerTaskHandler;
import com.kitty.game.config.NPC;
import com.kitty.game.npc.message.RespNpcContent;
import com.kitty.game.role.message.RespAppear;
import com.kitty.game.role.message.RespUpdateAppearance;
import com.kitty.game.role.model.Role;
import com.kitty.game.shidao.KuafuShidaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 跨服赛事
 */
@Component
public class KFSSSQRAppearanceHandler extends AppearanceHandler {
    @Autowired
    TowerTaskHandler towerTaskHandler;

    @Override
    public void changeRespAppear(Role role, NPC npc, RespAppear respAppear) {
//        TowerMirrorRankRecord xinJunRankData = towerTaskHandler.getXinJunRankData(role, npc.getId());
//        if (xinJunRankData != null) {
//            respAppear.setTitle(xinJunRankData.getName());
//            respAppear.setIcon(xinJunRankData.getIcon());
//        }
    }

    @Override
    public void changeRespUpdateAppearance(Role role, NPC npc, RespUpdateAppearance respUpdateAppearance) {
//        TowerMirrorRankRecord xinJunRankData = towerTaskHandler.getXinJunRankData(role, npc.getId());
//        if (xinJunRankData != null) {
//            respUpdateAppearance.setTitle(xinJunRankData.getName());
//            respUpdateAppearance.setIcon(xinJunRankData.getIcon());
//        }
    }

    @Override
    public void changeRespNpcContent(Role role, NPC npc, RespNpcContent respNpcContent) {
        respNpcContent.setContent(SpringUtils.getBean(KuafuShidaoService.class).point());
    }
}
